package com.program.houai.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @version v1.0
 * @ProjectName: EOrder-master
 * @ClassName: UserVipCardEntity
 * @Description: TODO(一句话描述该类的功能)
 * @Author: Topcheer
 * @Date: 2024/8/29 21:34
 */
@TableName("tb_user_vip_card")
@Data
@ApiModel(value ="用户购买的VIP卡",description = "用户购买的VIP卡的字段")
public class UserVipCardEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private int id;

    @ApiModelProperty(value = "卡主键")
    private int cardId;

    @ApiModelProperty(value = "用户Id")
    private int userId;

    @ApiModelProperty(value = "激活状态 0 未激活 1已激活")
    private int cardStatus;

    @ApiModelProperty(value = "有效期年")
    private int validityPeriod;

    @ApiModelProperty(value = "卡兑换码")
    private String cardCode;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "卡有效期")
    @JsonFormat(pattern="yyyy-MM-dd")
    private Date effectiveTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "会员卡名称")
    @TableField(exist = false)
    private String cardName;


    @ApiModelProperty(value = "会员卡等级")
    @TableField(exist = false)
    private String level;

    @ApiModelProperty(value = "卡的价格")
    @TableField(exist = false)
    private int price;

    @ApiModelProperty(value = "卡的价格-前端展示的")
    @TableField(exist = false)
    private String priceStr;

    @ApiModelProperty(value = "卡的图片")
    @TableField(exist = false)
    private String  url;

    @ApiModelProperty(value = "用户头像")
    @TableField(exist = false)
    private String  avatarUrl;

}
